<template>
  <div class="user">
    <ws-form :formItem="formItem"></ws-form>
  </div>
</template>

<script lang="ts">
import { defineComponent } from "vue";
import WsForm from "@/base-ui/form";
export default defineComponent({
  name: "user",
  components: {
    WsForm,
  },
  setup() {
    const formItem = [
      {
        type: "input",
        label: "用户名",
        rules: [],
        placeholder: "请输入用户名",
      },
      {
        type: "password",
        label: "密码",
        rules: [],
        placeholder: "请输入密码",
      },
      {
        type: "select",
        label: "运动",
        rules: [],
        placeholder: "请选择喜欢的运动",
        selectOptions: [
          {
            title: "篮球",
            value: "basketball",
          },
          {
            title: "足球",
            value: "football",
          },
          {
            title: "网球",
            value: "baseball",
          },
        ],
      },
      {
        type: "datepicker",
        label: "日期",
        rules: [],
        otherOptions: {
          startPlaceholder: "开始时间",
          endPlaceholder: "结束时间",
          type: "daterange",
        },
      },
    ];
    return {
      formItem,
    };
  },
});
</script>

<style scoped></style>
